ddns-scripts: remove minimum 5 minute wait
authorBrian J. Murrell <[email protected]>
Thu, 23 Feb 2023 20:01:46 +0000 (15:01 -0500)
committerFlorian Eckert <[email protected]>
Wed, 17 Dec 2025 14:33:59 +0000 (15:33 +0100)
To check if the update was successful.

Not all DDNS implementations have such huge latencies updating their services.

nsupdate for example, updates immediately and the update is immediately checkable.

Add new check_interval_min value to be able to set a check interval lower than the
previously hard-coded 5 minutes.

Fixes: #20564
Signed-off-by: Brian J. Murrell <[email protected]>
net/ddns-scripts/Makefile
net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh

index e39ebb3714f12b840bebdc33af8557e161ad47aa..8330d7b66f7a3f804b6a78665d3b9df497064099 100644 (file)
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ddns-scripts
 PKG_VERSION:=2.8.2
-PKG_RELEASE:=81
+PKG_RELEASE:=82
 
 PKG_LICENSE:=GPL-2.0
 
index f14941f309e723e38e17b06d57babd0cee617c0e..3815e3f07e31d4669ba74e1177d4d6121896d1c0 100644 (file)
@@ -157,8 +157,9 @@ trap "trap_handler 15" 15   # SIGTERM       Termination
 # ip_script    full path and name of your script to detect current IP
 # ip_interface physical interface to use for detecting
 #
-# check_interval       check for changes every  !!! checks below 10 minutes make no sense because the Internet
-# check_unit           'days' 'hours' 'minutes' !!! needs about 5-10 minutes to sync an IP-change for an DNS entry
+# check_interval       check for changes every
+# check_interval_min   check_interval minimum value (used to be check_interval's minimum value of 300 seconds)
+# check_unit           'days' 'hours' 'minutes'
 #
 # force_interval       force to send an update to your service if no change was detected
 # force_unit           'days' 'hours' 'minutes' !!! force_interval="0" runs this script once for use i.e. with cron
@@ -292,9 +293,10 @@ fi
 
 # compute update interval in seconds
 get_seconds CHECK_SECONDS ${check_interval:-10} ${check_unit:-"minutes"} # default 10 min
+get_seconds CHECK_SECONDS_MIN ${check_interval_min:-5} ${check_unit:-"minutes"}
 get_seconds FORCE_SECONDS ${force_interval:-72} ${force_unit:-"hours"}  # default 3 days
 get_seconds RETRY_SECONDS ${retry_interval:-60} ${retry_unit:-"seconds"} # default 60 sec
-[ $CHECK_SECONDS -lt 300 ] && CHECK_SECONDS=300                # minimum 5 minutes
+[ $CHECK_SECONDS -lt 300 ] && CHECK_SECONDS=$CHECK_SECONDS_MIN          # minimum 5 minutes
 [ $FORCE_SECONDS -gt 0 -a $FORCE_SECONDS -lt $CHECK_SECONDS ] && FORCE_SECONDS=$CHECK_SECONDS  # FORCE_SECONDS >= CHECK_SECONDS or 0
 write_log 7 "check interval: $CHECK_SECONDS seconds"
 write_log 7 "force interval: $FORCE_SECONDS seconds"